Revert "domctl: improve locking during domain destruction"
This reverts commit
228ab9992ffb1d8f9d2475f2581e68b2913acb88.
Performance analysis has shown that dropping the domctl lock during
domain destruction greatly increases the contention in the heap_lock,
thus making parallel destruction of domains slower.
The following lockperf data shows the difference between the current
code and the reverted one:
lock:
3342357(2.268295505s), block:
3263853(18.556650797s)
lock:
2788704(0.362311723s), block: 222681( 0.091152276s)
Those figures are from Dmitry Isaikin, and are gathered after
destroying 5 2GB HVM guests in parallel:
https://lists.xenproject.org/archives/html/xen-devel/2021-09/msg01515.html
Given the current point in the release, revert the commit and
reinstate holding the domctl lock during domain destruction. Further
work should be done in order to re-add more fine grained locking to
the domain destruction path once a proper solution to avoid the
heap_lock contention is found.
Reported-by: Hongyan Xia <hongyxia@amazon.com>
Reported-by: Dmitry Isaikin <isaikin-dmitry@yandex.ru>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>